import IndexModel from "../models/IndexModel";
const indexController = {
  baseAction() {
    
    return async (ctx, next) => {
      //throw 'test error!!!!' ;
      console.log('index action');
      const indexModel = new IndexModel();
      const result = await indexModel.getData();
      ctx.body = await ctx.render('index', result)
    }
  },
  testAction() {
    return async (ctx, next) => {
      ctx.body = 'test';
    }
  }
}

export default indexController;